package com.coin900.coin.server;


import com.coin900.coin.base.AjaxResponse;
import com.coin900.coin.base.FuConstants;
import com.coin900.coin.service.IQiniuService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;


/**
 * Unibon
 * <p/>
 * Copyright (c) 2012 YouPeng ValueSoft Inc., All rights reserved.
 * <p/>
 * This software is the confidential and proprietary information of
 * ValueSoft Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with ValueSoft.com.
 * <p/>
 * Revision History
 * Date      		Programmer       Notes
 * 2014/5/8   	     libo		     Initial
 * *********************************************************************
 */
@Controller
public class FileCtrl extends BaseController{
    private static final Log logger = LogFactory.getLog(FileCtrl.class);



    /**
     * 验证md5
     *
     * @param
     * @param request
     */
    @RequestMapping(value = "/qiniu/upToken", method = RequestMethod.GET)
    public ModelAndView checkMd5(HttpServletRequest request) {
        AjaxResponse resp = super.buildAjaxResponse(request);
        resp.addObject("uptoken", qiniuService.getUpToken());
        return resp.getMav();
    }


    @Autowired
    private IQiniuService qiniuService;




}
